package com.example.culture.mapper;

import com.example.culture.domain.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    User login(User user);

    List<Role> getRole();

    int register(User user);

    User checkEmail(@Param("email") String email);

    int updatePassword(User user);

    void expertLogin(User expertLoginUser);


    List<UserInfo> searchUser(@Param("username") String username,@Param("school") String school,@Param("classesName") String classesName,@Param("roleId") Integer roleId);

    int deleteUser(@Param("id") Integer id);


    User checkUsername(User user);

    User loginUser(User u);


    List<Classes> searchClassesAndGroup(@Param("classesName") String classesName);

    User checkUpdateUser(User user);

    int updateUser(User user);

    int addExperiment(Experiment experiment);

    List<Experiment> getExperiment(@Param("school") String school,@Param("classesName") String classesName,@Param("groupName") String groupName,@Param("username") String username);

    List<Classes> getClassesAndGroup();

    int selectUserCounts();

    int checkLoginName(@Param("loginName") String loginName,@Param("id") Integer id);

    int checkUserEmail(@Param("email") String email,@Param("id") Integer id);

    List<Nums> getNums();
}
